Skip to content

fix: 启动器场景优先读内置的yaml - #2723

Merged
ShadowLemoon merged 1 commit into
mainfrom
fix/launcher-bundled-yml
Aug 12, 2026
Merged

fix: 启动器场景优先读内置的yaml#2723
ShadowLemoon merged 1 commit into
mainfrom
fix/launcher-bundled-yml

Conversation

@ShadowLemoon

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4856dc56-3234-44f5-bbb0-410aeb359a14

📥 Commits

Reviewing files that changed from the base of the PR and between 84ed14c and 16a2bd0.

📒 Files selected for processing (8)
  • deploy/OneDragon-Launcher.spec
  • docs/develop/README.md
  • src/one_dragon/base/config/yaml_config.py
  • src/one_dragon/base/operation/one_dragon_env_context.py
  • src/one_dragon/devtools/python_launcher.py
  • src/one_dragon/envs/project_config.py
  • src/one_dragon/envs/repo_config.py
  • src/one_dragon/utils/os_utils.py

📝 Walkthrough

变更

  • 为启动器打包 project.ymlrepository.ymlresources/config
  • 为配置加载流程增加 prefer_bundled_config 参数。
  • 让启动器优先读取 PyInstaller 内置配置,并将修改写回工作目录。
  • get_resource_path 支持优先查找捆绑资源。
  • 更新启动器打包文档。

Walkthrough

启动器打包 project.ymlrepository.yml。配置加载支持优先读取 PyInstaller 资源,并将写入目标保留在工作目录。原始启动器启用该配置偏好。

Changes

捆绑配置加载

Layer / File(s) Summary
打包配置资源
deploy/OneDragon-Launcher.spec, docs/develop/README.md
PyInstaller 将两个 YAML 配置文件写入 resources/config。开发文档更新打包和配置读取说明。
捆绑资源解析
src/one_dragon/utils/os_utils.py, src/one_dragon/base/config/yaml_config.py
get_resource_path 支持优先查找 _MEIPASS/resourcesYamlConfig 可从捆绑路径读取,并使用工作目录路径写入配置。
启动器配置偏好传递
src/one_dragon/devtools/python_launcher.py, src/one_dragon/base/operation/one_dragon_env_context.py, src/one_dragon/envs/project_config.py, src/one_dragon/envs/repo_config.py
run_python 启用 prefer_bundled_config。该参数传递至环境上下文、项目配置和仓库配置。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant run_python
  participant OneDragonEnvContext
  participant ProjectConfig
  participant RepoConfig
  participant YamlConfig
  participant BundledResources
  run_python->>OneDragonEnvContext: 启用 prefer_bundled_config
  OneDragonEnvContext->>ProjectConfig: 创建项目配置
  OneDragonEnvContext->>RepoConfig: 创建仓库配置
  ProjectConfig->>YamlConfig: 传递配置偏好
  RepoConfig->>YamlConfig: 传递配置偏好
  YamlConfig->>BundledResources: 优先读取捆绑 YAML 文件
Loading

Possibly related PRs

Suggested reviewers: doctorreid

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive 未提供拉取请求描述,因此无法确认描述是否与变更内容相关。 补充说明打包配置、内置 YAML 配置读取逻辑及受影响的启动器场景。
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了启动器优先读取内置 YAML 配置这一主要变更。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/launcher-bundled-yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ShadowLemoon
ShadowLemoon merged commit a75973a into main Aug 12, 2026
9 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 2026
@ShadowLemoon
ShadowLemoon deleted the fix/launcher-bundled-yml branch August 19, 2026 02:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant